package yesjava;

import java.util.Arrays;

/**
 * 演示 Arrays 工具类
 */
public class ArraysDemo {
    public static void main(String[] args) {
        /*int [] arr= new int[]{85,86,85,74,254,54,3,5,75};
        Arrays.sort(arr);
        for (int i : arr) {
            System.out.println(i);
        }*/
        //Arrays.
       /* int [] arr2 = new int[80];
        Arrays.fill(arr2,100);
        for (int i : arr2) {
            System.out.println(i);
        }*/
//       /* for (int i = 0; i < arr2.length; i++) {
//            arr2[i] = 100;
//        }*/
        Integer [] arr= new Integer[]{85,86,85,74,254,54,3,5,75};
        //判断一个数组中是否包含某个元素
        boolean b = Arrays.asList(arr).contains(85);
       /* for (int i = 0; i < arr.length; i++) {
            if(arr[i]==85){
                b= true;
                break;
            }
        }*/
        System.out.println(b?"OK":"NO");

    }
}
